package cn.kbyue.testcasedemo.service;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.time.Clock;
import java.time.LocalDateTime;

@Slf4j
@RequiredArgsConstructor
@Service
public class ExpireService {

    // 单元测试
    private final Clock clock;

    public boolean isExpired(LocalDateTime dateTime) {
        return dateTime.isBefore(LocalDateTime.now(clock));
    }

}
